import React,{Component} from 'react';
import { Form, Select, Input, Button, Modal } from 'antd';
const FormItem = Form.Item;
const Option = Select.Option;
const { TextArea } = Input;
var networkstatus={
	1000:'创建中',
	1010:'创建成功',
	1020:'创建失败',
	2000:'启动中',
	2010:'启动成功',
	2020:'启动失败',
	3000:'停止中',
	3010:'已停止',
	2030:'启动失败',
	3020:'停止失败',
}
class detail extends Component{
    constructor(){
        super()
        this.state={
        }
    }
    joinnetwork=()=>{
        var {inviteshowModal,detaildata}=this.props
        inviteshowModal(detaildata)
    }    
    render() {
        const { visible, onCancel, form ,detaildata} = this.props;
        const { getFieldDecorator } = form;
        var detaildatan=detaildata?detaildata:{}
        return (
            <Modal
                className='detailclosekeymanagement'
                visible={visible}
                title='查看公钥'
                okText="确认"
                onCancel={onCancel}
                onOk={onCancel}   
            >
            <Form>
                <FormItem
                    label="密钥名称"
                    labelCol={{ span: 6 }}
                    wrapperCol={{ span: 15 }}
                >
                        <Input value={detaildatan['密钥名称']}  />
                </FormItem>
                <FormItem
                    label="密钥类型"
                    labelCol={{ span: 6}}
                    wrapperCol={{ span: 15 }}
                >
                        <Input value={detaildatan['密钥类型']} />
                        {/* <span>{detaildatan['密钥类型']}</span> */}
                </FormItem>
                <FormItem
                    label="匹配证书"
                    labelCol={{ span: 6}}
                    wrapperCol={{ span: 15 }}
                >
                        <Input value={detaildatan['匹配证书']} />
                        {/* <span>{detaildatan['匹配证书']}</span> */}
                </FormItem>

                <FormItem
                    label="公钥"
                    labelCol={{ span: 6 }}
                    wrapperCol={{ span: 15 }}
                >
                        <TextArea value={detaildatan.pubilckey} autosize={{ minRows: 2, maxRows: 6 }}    />
                </FormItem>          
            </Form>
          </Modal>
        );
      } 
}
const Detail = Form.create()(detail);
export default Detail;